Vmgen - a generator of efficient virtual machine interpreters

نویسندگان

  • M. Anton Ertl
  • David Gregg
  • Andreas Krall
  • Bernd Paysan
چکیده

In a virtual machine interpreter, the code for each virtual machine instruction has similarities to code for other instructions. We present an interpreter generator that takes simple virtual machine instruction descriptions as input and generates C code for processing the instructions in several ways: execution, virtual machine code generation, disassembly, tracing, and profiling. The generator is designed to support efficient interpreters: it supports threaded code, caching the top-of-stack item in a register, combining simple instructions into superinstructions, and other optimizations. We have used the generator to create interpreters for Forth and Java. The resulting interpreters are faster than other interpreters for the same languages and they are typically 2–10 times slower than code produced by native-code compilers. We also present results for the effects of the individual optimizations supported by the generator. Copyright  2002 John Wiley & Sons, Ltd.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Vmgen | a Generator of Eecient Virtual Machine Interpreters

Machine Interpreters M. Anton Ertl1; ;y, David Gregg2, Andreas Krall1, and Bernd Paysan3 1Institut f ur Computersprachen, Technische Universit at Wien, Argentinierstra e 8, A-1040 Wien, Austria 2Department of Computer Science, Trinity College, Dublin 2, Ireland 3Stockmannstr. 14, D-81477 M unchen, Germany SUMMARY In a virtual machine interpreter, the code for each virtual machine instruction...

متن کامل

Building an Interpreter with Vmgen

Vmgen automates many of the tasks of writing the virtual machine part of an interpreter, resulting in less coding, debugging and maintenance eeort. This paper gives some quantitative data about the source code and generated code for a vmgen-based interpreter, and gives some examples demonstrating the simplicity of using vmgen.

متن کامل

Tiger - An Interpreter Generation Tool

Tiger (Trinity Interpreter GEneratoR) is a new interpreter generator tool along the lines of vmgen, but with significant improvements in flexibility and feedback. Support for important new features such as instruction specialisation, replication and improved analysis of code at runtime are presented. A simple ‘C’ virtual machine imported into Tiger is used for demonstration purposes. Various re...

متن کامل

Optimizing Indirect Branch Prediction Accuracy in Virtual Machine Interpreters

The paper [EG03b] deals with two methods, which are used to reduce mispredictions of indirect branches in virtual machine interpreters. Interpreters designed for efficiency can spent a lot of their execution time recovering from misprediction of indirect branches. Branch target buffers is a common method of reducing mispredictions, however the accuracy of this method in existing interpreters is...

متن کامل

The Behavior of Efficient Virtual Machine Interpreters on Modern Architectures

Romer et al (ASPLOS 96) examined several interpreters and concluded that they behave much like general purpose integer programs such as gcc. We show that there is an important class of interpreters which behave very differently. Efficient virtual machine interpreters perform a large number of indirect branches (3.2%–13% of all executed instructions in our benchmarks, taking up to 61%-79% of the...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Softw., Pract. Exper.

دوره 32  شماره 

صفحات  -

تاریخ انتشار 2002